package com.emapp.lccode.bean

import android.annotation.SuppressLint
import android.os.Parcelable
import kotlinx.android.parcel.Parcelize

@SuppressLint("ParcelCreator")
@Parcelize
data class SelectType(
    var id0: String = "",
    var name0: String = "",
    var id1: String = "",
    var name1: String = "",
    var id2: String = "",
    var name2: String = ""
) : Parcelable {
    var device_type: String = ""
        get() {
            field = ""
            if (id2.isNotBlank())
                field = id2
            else if (id1.isNotBlank())
                field = id1
            return field
        }
    var device_type_name: String = ""
        get() {
            field = ""
            if (name2.isNotBlank())
                field = "$name1,$name2"
            else if (name1.isNotBlank())
                field = name1
            return field
        }
}
